package com.idfsgm;

import java.util.ArrayList;
import java.util.Date;

import com.example.idfsgm.R;

import datatypes.listItemData;
import android.app.Activity;
import android.content.Context;
import android.graphics.BitmapFactory;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.TextView;
 

public class ActivityList extends BaseAdapter {

        private Activity activity;
        private ArrayList<listItemData> data;
        private static LayoutInflater inflater = null;

        public ActivityList(Activity a, ArrayList<listItemData> arrayLst) {
                activity = a;
                data = arrayLst;
                inflater = (LayoutInflater) activity
                                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
 
        }

        public int getCount() {
                return data.size();
        }

        public Object getItem(int position) {
                return position;
        }

        public long getItemId(int position) {
                return position;
        }

        public View getView(int position, View convertView, ViewGroup parent) {
                View view = convertView;
                listItemData listItem = data.get(position);

                if (listItem.isGhostMode()) {
                        if (convertView == null)
                                view = inflater.inflate(R.layout.main, null);
                       
                }
                
                return view;
        }


        private void setActivity(View view, Activity activity) {

            
                ImageView img = (ImageView) view.findViewById(R.id.action_settings);

                String FriendID = null;

             
                img.setTag(FriendID);
                 

        }

   
}